package hephaestus.model.metamodel;

import hephaestus.model.HelperClass;

/**
 * Esta classe representa um atributo de uma classe modelada
 * 
 * @author $Leandro$
 * 
 */
public class Attribute extends TypeableElement {

	private String capName;

	private String defaultValue;

	public Attribute(String name, String type) {
		super(name, type);
		this.capName = name != null ? HelperClass.capitalize(name) : "";
	}

	public Attribute(String name, String type, String visib) {
		super(name, type);
		this.visibility = visib;
		this.capName = name != null ? HelperClass.capitalize(name) : "";
	}

	/**
	 * @return Retorna o defaultValue.
	 */
	public String getDefaultValue() {
		return defaultValue;
	}

	/**
	 * @param defaultValue
	 *            O defaultValue a ser definido.
	 */
	public void setDefaultValue(String defaultValue) {
		this.defaultValue = defaultValue;
	}

	public String getCapName() {
		return capName;
	}

	public void setCapName(String capName) {
		this.capName = capName;
	}
}